\(\int \frac {-1+2 x+5 x^2}{(1+x+x^2)^4} \, dx\) [177]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 11 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{\left (1+x+x^2\right )^3} \]

[Out]

-x/(x^2+x+1)^3

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {1602} \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{\left (x^2+x+1\right )^3} \]

[In]

Int[(-1 + 2*x + 5*x^2)/(1 + x + x^2)^4,x]

[Out]

-(x/(1 + x + x^2)^3)

Rule 1602

Int[(Pp_)*(Qq_)^(m_.), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[Coeff[Pp, x, p]*x^(p - q +
 1)*(Qq^(m + 1)/((p + m*q + 1)*Coeff[Qq, x, q])), x] /; NeQ[p + m*q + 1, 0] && EqQ[(p + m*q + 1)*Coeff[Qq, x,
q]*Pp, Coeff[Pp, x, p]*x^(p - q)*((p - q + 1)*Qq + (m + 1)*x*D[Qq, x])]] /; FreeQ[m, x] && PolyQ[Pp, x] && Pol
yQ[Qq, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {x}{\left (1+x+x^2\right )^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{\left (1+x+x^2\right )^3} \]

[In]

Integrate[(-1 + 2*x + 5*x^2)/(1 + x + x^2)^4,x]

[Out]

-(x/(1 + x + x^2)^3)

Maple [A] (verified)

Time = 0.76 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.09

method result size
gosper \(-\frac {x}{\left (x^{2}+x +1\right )^{3}}\) \(12\)
default \(-\frac {x}{\left (x^{2}+x +1\right )^{3}}\) \(12\)
norman \(-\frac {x}{\left (x^{2}+x +1\right )^{3}}\) \(12\)
risch \(-\frac {x}{\left (x^{2}+x +1\right )^{3}}\) \(12\)
parallelrisch \(-\frac {x}{\left (x^{2}+x +1\right )^{3}}\) \(12\)

[In]

int((5*x^2+2*x-1)/(x^2+x+1)^4,x,method=_RETURNVERBOSE)

[Out]

-x/(x^2+x+1)^3

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (11) = 22\).

Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 3.00 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{x^{6} + 3 \, x^{5} + 6 \, x^{4} + 7 \, x^{3} + 6 \, x^{2} + 3 \, x + 1} \]

[In]

integrate((5*x^2+2*x-1)/(x^2+x+1)^4,x, algorithm="fricas")

[Out]

-x/(x^6 + 3*x^5 + 6*x^4 + 7*x^3 + 6*x^2 + 3*x + 1)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 31 vs. \(2 (10) = 20\).

Time = 0.05 (sec) , antiderivative size = 31, normalized size of antiderivative = 2.82 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=- \frac {x}{x^{6} + 3 x^{5} + 6 x^{4} + 7 x^{3} + 6 x^{2} + 3 x + 1} \]

[In]

integrate((5*x**2+2*x-1)/(x**2+x+1)**4,x)

[Out]

-x/(x**6 + 3*x**5 + 6*x**4 + 7*x**3 + 6*x**2 + 3*x + 1)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (11) = 22\).

Time = 0.18 (sec) , antiderivative size = 33, normalized size of antiderivative = 3.00 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{x^{6} + 3 \, x^{5} + 6 \, x^{4} + 7 \, x^{3} + 6 \, x^{2} + 3 \, x + 1} \]

[In]

integrate((5*x^2+2*x-1)/(x^2+x+1)^4,x, algorithm="maxima")

[Out]

-x/(x^6 + 3*x^5 + 6*x^4 + 7*x^3 + 6*x^2 + 3*x + 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{{\left (x^{2} + x + 1\right )}^{3}} \]

[In]

integrate((5*x^2+2*x-1)/(x^2+x+1)^4,x, algorithm="giac")

[Out]

-x/(x^2 + x + 1)^3

Mupad [B] (verification not implemented)

Time = 12.85 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \frac {-1+2 x+5 x^2}{\left (1+x+x^2\right )^4} \, dx=-\frac {x}{{\left (x^2+x+1\right )}^3} \]

[In]

int((2*x + 5*x^2 - 1)/(x + x^2 + 1)^4,x)

[Out]

-x/(x + x^2 + 1)^3